SQL Prepare Error

Error Number: 42000

You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '%20data.insert.photo%20+%20'' limit 1' at line 1

SELECT * from table_redirect where oldlink='https://sereneteacafe.com/iweb@cache/upload/user/'%20+%20data.insert.photo%20+%20'' limit 1